import request from "../utils/request.js";

/**
 * @description: 登录
 * @return {object}
 */
export function login(params) {
  return request({
    url: '/applet/user/authorization',
    method: 'post',
    data: params
  })
}

/**
 * @description: h5登录
 * @return {object}
 */
export function h5Login(params) {
  return request({
    url: '/applet/user/h5Login',
    method: 'post',
    data: params
  })
}

/**
 * @description: h5登录
 * @return {object}
 */
export function h5Register(params) {
  return request({
    url: '/applet/user/h5Register',
    method: 'post',
    data: params
  })
}

/**
 * @description: h5登录
 * @return {object}
 */
export function getH5AppletInfoByAppletType(params) {
  return request({
    url: '/applet/getH5AppletInfoByAppletType',
    method: 'get',
    data: params
  })
}

/**
 * @description: 更新用户信息
 * @return {object}
 */
export function updateUserInfo(params) {
  return request({
    url: '/applet/user/updateUserInfo',
    method: 'post',
    data: params
  })
}

/**
 * @description: 获取用户信息
 * @return {object}
 */
export function getUserInfoById(params) {
  return request({
    url: '/applet/user/getUserInfoById',
    method: 'get',
    data: params
  })
}

/**
 * @description: 获取邀请人信息
 * @return {object}
 */
export function getInvitationUserInfoBySourceCode(params) {
  return request({
    url: '/applet/user/getInvitationUserInfoBySourceCode',
    method: 'get',
    data: params
  })
}

/**
 * @description: 更换邀请人信息
 * @return {object}
 */
export function changeInvitationUser(params) {
  return request({
    url: '/merchant/merchantAuthor/changeInvitationUser',
    method: 'post',
    data: params
  })
}

/**
 * @description: 更改快手模式
 * @return {object}
 */
export function updatekuaishouModel(params) {
  return request({
    url: '/merchant/updatekuaishouModel',
    method: 'post',
    data: params
  })
}

// 小程序端用户订单统计
export function userStatisticsOrder(params) {
  return request({
    // url: '/artworksOrder/userStatisticsOrder',
    url: '/artworksOrder/newUserStatisticsOrder',
    method: 'get',
    data: params
  })
}

/**
 * @description: 根据用户信息获取签到配置
 * @return {object}
 */
 export function signInfoByUserId() {
  return request({
    url: '/sign/signInfoByUserId',
    method: 'get'
  })
}

/**
 * @description: 用户签到
 * @return {object}
 */
 export function userSign(params) {
  return request({
    url: '/sign/userSign',
    method: 'post',
    data: params
  })
}

/**
 * @description: 用户金币兑换余额
 * @return {object}
 */
 export function userConversion(params) {
  return request({
    url: '/sign/userConversion',
    method: 'post',
    data: params
  })
}


/**
 * @description: 获取全部作品分类
 * @return {object}
 */
 export function allArtworksCategory(params) {
  return request({
    url: '/artworks/allArtworksCategory',
    method: 'get',
    data: params
  })
}

/**
 * @description: 获取全部作品分类
 * @return {object}
 */
 export function allArtworksTypeByMerchantId(params) {
  return request({
    url: '/artworks/allArtworksTypeByMerchantId',
    method: 'get',
    data: params
  })
}

/**
 * @description: 提交反馈问题
 * @return {object}
 */
export function sumbitFeedback(params) {
  return request({
    url: '/feedback/sumbitFeedback',
    method: 'post',
    data: params
  })
}

/**
 * @description: 根据邀请码（推广码）搜索创作者
 * @return {object}
 */
export function userInfoByInvitationCode(params) {
  return request({
    url: '/merchant/userInfoByInvitationCode',
    method: 'get',
    data: params
  })
}

/**
 * @description: 文本内容审核
 * @return {object}
 */
export function checkTxt(params) {
  return request({
    url: '/applet/user/checkTxt',
    method: 'post',
    data: params
  })
}

/**
 * @description: 文本内容审核
 * @return {object}
 */
export function getWechatConfig(params) {
  return request({
    url: '/weixin/getWechatConfig',
    method: 'get',
    data: params
  })
}

/**
 * @description: 新版本团队收益统计
 * @return {object}
 */
export function newMerchantEarning(params) {
  return request({
    url: '/authorEarning/newMerchantEarning',
    method: 'post',
    data: params
  })
}

/**
 * @description: 新版团队成员信息
 * @return {object}
 */
export function getMemberCounts(params) {
  return request({
    url: '/authorEarning/getMemberCounts',
    method: 'post',
    data: params
  })
}

/**
 * @description: 新版团队成员信息
 * @return {object}
 */
export function getTeamEarningList(params) {
  return request({
    url: '/authorEarning/getTeamEarningList',
    method: 'post',
    data: params
  })
}

/**
 * @description: 添加抖音挂载信息
 * @return {object}
 */
export function addDouyinMount(params) {
  return request({
    url: '/douyinMount/create',
    method: 'post',
    data: params
  })
}

/**
 * @description: 添加抖音挂载信息
 * @return {object}
 */
export function findDouyinMountListByUserId(params) {
  return request({
    url: '/douyinMount/findDouyinMountListByUserId',
    method: 'get',
    data: params
  })
}

